Architecture for computing a two-dimensional discrete wavelet transform

ABSTRACT

The invention provides an integrated systolic architecture which can perform both forward and inverse Discrete Wavelet Transforms with a minimum of complexity. A plurality of processing cells, each having an adder and a multiplier, are coupled to a set of multiplexers and delay elements to selectively receive a single input datastream in the forward DWT mode and two datastreams in the inverse DWT mode. In the forward DWT mode, the integrated architecture decomposes the input datastream into two output sequences—a high frequency sub-band output and a low frequency sub-band output. In the inverse DWT mode, the integrated architecture reconstructs the original input sequence by outputting even terms and odd terms on alternating clock cycles. As a result, the architecture can achieve 100% utilization and is suitable to be implemented in VLSI circuitry.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention is related to signal/image processing and encoding. More specifically, the invention relates to architectures to execute signal/image processing functions.

2. Description of Related Art

Using traditional Fourier analysis (transforms), any signal can be approximated as a sum of sinusoidal waveforms of assorted frequencies. While Fourier transforms are ideally suited for signals having repeated behavior, such as in speech signals, it fails to efficiently approximate signals with sharp discontinuities such as the edge features in images, or signals encoded for digital communications. Therefore, in recent years, a new form of analysis, known as Wavelet analysis has been developed to better represent signals that have exaggerated and discontinuous features. A transform, similar to the Fourier transform, Discrete Wavelet Transform (DWT), based on Wavelet analysis, has been developed to represent signals with discontinuous features. The DWT may be a “discrete” algorithm, which indicates that rather than approximating a signal using continuous waveforms, the signal is approximated by discrete samples of waveform. Since the transform is discrete, the DWT can be implemented using digital logic such as Very Large Scale Integrated (VLSI) circuits and thus can be integrated on a chip with other digital components.

The essence of DWT is to decompose an input signal into two or more frequency sub-bands. An input signal may be decomposed into two outputs—a low frequency sub-band output obtained using a low-pass filter, and a high frequency sub-band output using a high-pass filter. Each of these sub-bands can be encoded separately using a suitable coding system. Each sub-band can further be divided into smaller and smaller sub-bands as is required. If an input signal is decomposed into two sub-bands, then to reconstruct the input signal, the VLSI architecture used must be able to receive two inputs and return one output. Fundamentally, therefore, the forward DWT transform, i.e., the transform performing the decomposition, is asymmetric to the inverse DWT transform, i.e., the transform performing the reconstruction since they require different numbers of inputs and outputs. Thus, traditional VLSI architectures for the DWT computation (decomposition and reconstruction) have two separate and distinct circuitry, one for the forward DWT and one for inverse DWT. The circuitry of such architecture is complicated further since the forward and inverse transforms use different filter coefficients and schedule (delay) certain inputs in differing stages of the computation.

To reduce the speed and cost of the forward DWT and inverse DWT transform, therefore, there is needed a single integrated architecture which can perform both the forward DWT transform and the inverse DWT transform without separate circuitry or processing elements. Further, the separate architectures for the forward DWT and inverse DWT if needed must also be reduced in complexity.

SUMMARY

The invention uses certain mathematical properties of filters used in the DWT computation as well as data parallelism in the DWT computation to provide an integrated systolic architecture for decomposing as well as recomposing signals approximated using the DWT.

The integrated architecture receives a single input bitstream when computing the forward DWT and two different input bitstreams when computing the inverse DWT. Using multiplexers, clock and control signals, the integrated architecture determines whether the forward or inverse DWT is to be computed and correspondingly activates appropriate processing elements as well as inputs and outputs. A unique feature of the architecture—a single set of five processing cells—can be used to perform both the forward DWT and inverse DWT thereby eliminating the need for separate processing cells for the forward and inverse DWT. Each of the five processing cells utilizes an adder and a multiplier and receives several operands in order to compute the DWT.

In computing the forward DWT, a single input sequence generates two decomposed output sequences. Conversely, when the integrated architecture is performing the inverse DWT, two input sequences generate a single reconstructed output sequence. According to a mathematical manipulation of the DWT function, in the forward DWT, four clock cycles are required to pass in order to initialize the set of five processing cells, after which, in all successive clock cycles, an input sequence is processed such that for every clock cycle, one input yields one output. The five processing cells of the integrated architecture are further coupled to an adder module and control circuit which generates the control signals required to tell the integrated architecture whether the forward DWT or the inverse DWT should be performed and computes the final stage in the mathematical algorithm dictated by the DWT computation.

The integrated architecture of the invention can be used in a variety of applications such as image compression or other image processing applications. In this regard, the one-dimensional DWT described above can be extended to two dimensions by using two one-dimensional DWT processing modules and a transpose circuit.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a systolic array for computing a forward Discrete Wavelet Transform.

FIG. 2 illustrates the basic processing cell which is used in the DWT computation.

FIG. 3 shows a systolic architecture for computing an inverse Discrete Wavelet Transform.

FIG. 4 shows a single integrated systolic architecture than can be used for both the forward Discrete Wavelet Transform and the inverse Discrete Wavelet Transform.

FIG. 5 shows a timing diagram of control signals, clocking signals and output terminals for the integrated architecture of FIG. 4 when operating in the forward DWT mode.

FIG. 6 shows a timing diagram of control signals, clocking signals and output terminals for the integrated architecture of FIG. 4 when operating in the inverse DWT mode.

FIG. 7 shows the construction of a two-dimensional integrated Discrete Wavelet Transform and inverse Discrete Wavelet Transform module.

FIG. 8 is a flowchart of the basic method of integrating forward and inverse DWT in a single architecture.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 shows a systolic array for computing a forward Discrete Wavelet Transform

FIG. 1 shows an input x_(i) 100 which is a single N-bit integer or floating point value from an input sequence representing discrete samples of an input signal that is to be encoded. Though not specifically mentioned, all inputs and outputs are of the precision/type of the input. Further, the various adders, multipliers and registers discussed can be readily designed by one skilled in the art depending upon the precision/type required. In order for the array shown in FIG. 1 to be initialized, inputs x₁, x₂, x₃, and x₄ must first propagate through the delay elements 110, 112, 114, and 116. Thereafter, for every x_(i) 100 that is input, two outputs will be generated by the array. These two outputs are shown in FIG. 1 as a_(i−4) 150, which is the low frequency sub-band (LFS) output and, c_(i−3) 160, which is the high frequency sub-band (HFS) output.

Each of the basic processing cells which compose the array are comprised of an adder and a multiplier and produce two sets of intermediate outputs. The first set of intermediate outputs, L₀ from cell D₀ 121, L₁ from cell D₁ 122, L₂ from cell D₂ 124, L₃ from cell D₃ 126, and L₄ from cell D₄ 128, are added by adder 130 to generate the LFS values a_(i−4) 150. Likewise, the second set of intermediate outputs, M₁ from cell D₁ 122, M₂ from cell D₂ 124, M₃ from cell D₃ 126, and M₄ from cell D₄ 128, are added together by adder 140 to generate the HFS values c_(i−3) 160. To generate the first HFS output c₀, which occurs at i=3 (i=0, 1, 2 . . . ), the first four clock cycles and, consequently, the first three intermediate outputs, L₁, L₂, and L₃ are required. On the next clock cycle, at i=4, the LFS output a₀ will be generated and observed. Thus, the outputs a_(i−4) 150 and c_(i−3) 160 are observed alternately at the trailing edges of even and odd clock cycles. The architecture is therefore 100% utilized since, at every clock cycle, one output, either a_(i−4) or c_(i−3) is being generated. Though not shown in FIG. 1, a multiplexer with a clock (alternating sequence) as a control signal can be used to observe the alternating outputs in the proper sequence.

The architecture of the array shown in FIG. 1 is “systolic”, i.e., repeated, in that each of the processing cells 121, 122, 124, 126 and 128 are composed of one adder and one multiplier and vary only in the value of the filter coefficients which may be stored in a programmable register or other memory.

FIG. 2, which shows the basic processing cell D_(k) 200, is first described to aid in understanding the array of FIG. 1. Referring to FIG. 2, given two filter coefficients, h and g, with h representing the high-pass coefficients and g representing low-pass coefficients, the intermediate output L_(k) is computed by the following expression: L_(k)=(p_(k)+q_(k))*h. Likewise, the intermediate output M_(k) is computed by cell 200 according to the following expression: M_(k)=(p_(k)+q_(k))*g. In the expressions for L_(k) and M_(k), the term q_(k) represents the input data x_(i) 100 which is the subject of the DWT, while the term p_(n−1), refers to the input data x_(i) 100 from the coupled processing cell from the previous clock cycle and p_(k) the input data the current clock cycle, respectively. The input p_(k) is passed through to output p_(k−1) from a cell D_(k) to the previous cell D_(k−1) in the array. Thus the terms p_(k) and p_(k−1) will be referred to hereinafter as “propagated inputs.”

The basic processing cell 200 of FIG. 2 may be repeatedly built and coupled to perform the forward DWT computation. The DWT is advantageous for compression since it is a “pyramid” algorithm. In a pyramid algorithm, for a one-dimensional Wavelet Transform, every other sample is thrown away or downsampled, and thus the data set is halved at each iteration. Thus, after J iterations of the FIG. 1 computation, the number of samples being manipulated shrinks by 2 ^(J). To compute a Wavelet Transform of a signal of N samples, the CPU cycle time required would amount to only K*N, where K is a constant determined by the Wavelet chosen (i.e., coefficients used).

The forward DWT computation, which is implemented by the architecture of the array in FIG. 1, can be represented by a_(n)=Σ_(K) h_(2n−K)x_(K) (LFS outputs) and c_(n)=Σ_(K) g_(2n−K)x_(K) (HFS outputs). The low-pass filter coefficients h_(i) and the high-pass filter coefficients g_(i) have certain symmetric properties which can be manipulated to implement the architecture shown in the array of FIG. 1. The filters used for the DWT may be IIR (Infinite Impulse Response) or FIR (Finite Impulse Response) digital filters, the design of which is well-known in the art. An optimal filter to use is a biorthogonal spline filter, which by its properties can simplify the computation. A biorthogonal spline filter has nine low-pass filter coefficients h⁻⁴, h⁻³, h⁻², h⁻¹, h₀, h₁, h₂, h₃, and h₄. The biorthogonal spline filter also has seven high-pass filter coefficients g⁻², g⁻¹, g₀, g⁻¹, g⁻², g₃, and g4.

The LFS outputs are as follows:

a₀=h₀x₀+h⁻¹x₁+h⁻²x₂+h⁻³x₃+h⁻⁴x₄,

a₁=h₂x₀+h₁x₁+h₀x₂+h⁻¹x₃+h⁻²x₄+h⁻³x₅+h⁻⁴x₆,

a₂=h₄x₀+h₃x₁+h₂x₂+h₁x₃+h₀x₄+h⁻¹x₅+h⁻²x₆+h⁻³x₇+h⁻⁴x₈,

a_(n/2−2)=h₄x_(N−8)+h₃x_(N−7)+h₂x_(N−6)+h₁x_(N−5)+h₀x_(N−4)+h⁻¹x_(N−3)+h⁻²x_(N−2)+h⁻³x_(N−1),

a_(n/2−1)=h₄x_(N−6)+h₃x_(N−5)+h₂x_(N−4)+h₁x_(N−3)+h₀x_(N−2)+h⁻¹x_(N−1).

One property of the low-pass filter coefficients is that of symmetry such that h_(−i)=h_(i). Thus, h⁻¹=h₁, h⁻²=h₂, h⁻³=h₃, h⁻⁴=h₄ Thus, a₁ may be rewritten as:

a₁=h₀x₂+h₁(x₁+x₃)+h₂(x₀+x₄)+h₃x₅+h₄x₆. Likewise, other LFS outputs may be conveniently re-arranged such that only one add and one multiply operation is required in each processing cell. The simplified LFS outputs after applying the symmetric filter properties for low-pass coefficients are as follows:

a₀=h₀x₀+h₁x₁+h₂x₂+h₃x₃+h₄x₄

=h₀(x₀+0)+h₁(x₁+0)+h₂(x₂+0)+h₃(x₃+0)+h₄(x₄+0)

a₁=h₂x₀+h₁x₁+h₀x₂+h₁x₃+h₂x₄+h₃x₅+h₄x₆

=h₀(x₂+0)+h₁(x₁+x₃)+h₂(x₀+x₄)+h₃(x₅+0)+h₄(x₆+0)

a₂=h₀(x₄+0)+h₁(x₃+x₅)+h₂(x₂+x₆)+h₃(x₁+x₇)+h₄(x₀+x₈)

a₃=h₀(x₆+0)+h₁(x₅+x₇)+h₂(x₄+x₈)+h₃(x₃+x₉)+h₄(x₂+x₁₀)

a₄=h₀(x₈+0)+h₁(x₇+x₉)+h₂(x₆+x₁₀)+h₃(x₅+x₁₁)+h₄(x₄+x₁₂)

The symmetry of the coefficients also reduces the total number of processing cells required so that an architecture like that of FIG. 1 may be used to compute the forward DWT. At the fourth clock cycle, where i=3, a_(i−4) is ignored (skipped), and c_(o) is instead observed after being computed, which is the first HFS output (see below for description).

At the fifth clock cycle, i=4, the c_(i−3) 160 output is skipped and instead, the LFS output a_(i−4) 150 is instead observed. Returning to the array of FIG. 1, a₀ is computed as follows. At i=4, the fifth clock cycle, cell D₀ 121 receives x₄, D₁ 122 receives x₃ (from previous cycle), D₂ 124 receives x₂, D₃ 126 receives x₁ and D₄ 128 receives 0 as their respective q_(i) values. Also, at i=4, the propagated input p_(i) for cell D₄ 128 is x₀. Since there is, by definition, no x⁻¹, x⁻², etc., cells D₁ 122 and D₀ 121 receive nulls or 0 values at i=4. Using the basic formula L_(i)=(p_(i)+q_(i))*h for each processing cell, we get from D₀ 121 the intermediate output L₀=(0+x₄)*h₄. Likewise, D₁ 122 generates L₁=(0+x₃)*h₃, D₂ 124 generates L₂=(0+x₂)*h₂, D₃ 126 generates L₃=(0+x₁)*h₁ and D₄ 128 generates L₄=(x₀+0)*h₀. Adder 130 computes the sum of L₀, L₁, L₂, L₃ and L₄ which yields the first output a₀=x₀h₀+x₁h₁+x₂h₂+x₃h₃+x₄h₄.

In the case for i=4, D₃ 126 receives no propagated input from D₄ 128 since D₄ 128 received no propagated input q_(i) (referring to processing cell 200 description for FIG. 2) until i=4. Similarly, all the LFS outputs a_(i−4) 150 and c_(i−3) 160 may be computed. The processing cell 200 of FIG. 2 may also contain a latch register or other mechanism to hold propagated inputs before passing them to the next cell. One reasonably skilled in the art of digital design will readily be able to design/implement the add, multiply and delay elements required by the precision/value of the DWT inputs and outputs.

The HFS outputs are as follows:

c₀=g₀x₀+g⁻¹x₁+g⁻²x₂,

c₁=g₂x₀+g₁x₁+g₀x₂+g⁻¹x₃+g⁻²x₄,

c₂=g₄x₀+g₃x₁+g₂x₂+g₁x₃+g₀x₄+g⁻¹x₅+g⁻²x₆,

C_(n/2−2)=g₄x_(N−8)+g₃x_(N−7)+g₂x_(N−6)+g₁x_(N−5)+g₀x_(N−4)+g⁻¹x_(N−3)+g⁻²x_(N−2),

C_(n/2−1)=g₄x_(N−6)+g₃x_(N−5)+g₂x_(N−4)+g₁x_(N−3)+g₀x_(N−2)+h⁻¹x_(N−1).

The high-pass coefficients are also symmetric, but in a different sense. The inverse DWT low-pass filter coefficients are represented by {overscore (h)}. These inverse coefficients are symmetric such that {overscore (h)}_(n)={overscore (h)}_(−n). The high-pass forward DWT filter coefficients have the property g_(n)=(−1){overscore (h)}_(1−n). Since {overscore (h)}_(n)={overscore (h)}_(−n), also g_(n)=(−1)^(n){overscore (h)}_(n−1). Thus, for n=2, g₂=h₁, but also for n=0, g₀=h₁. Therefore, g₂=g₀={overscore (h)}₁. Likewise, it can be shown that g⁻²=g₄={overscore (h)}₃ and g⁻¹=g₃={overscore (h)}₂. Substituting these equations for the expanded c_(n) yields, for instance, c₂=g₁x₃+g₂(x₂+x₄)+g₃(x₁+x₅)+g₄(x₀+x₆). Thus, only the coefficients g₁, g₂, g₃ and g₄ are required to compute the HFS outputs c_(i−3) 160. The symmetric property of biorthogonal spline filter coefficients allows a great reduction in computation, and consequently in the architecture required.

The simplified HFS outputs after applying the symmetric filter properties for high-pass coefficients are as follows:

c₀=g₂x₀+g₃x₁+g₄x₂

=g₂(x₀+0)+g₃(x₁+0)+g₄(x₂+0)

c₁=g₂x₀+g₁x₁+g₀x₂+g⁻¹x₃+g⁻²x₄

=g₁(x₁+0)+g₂(x₂+x₀)+g₃(x₃+0)+g₄(x₄+0)

c₂=g₄x₊g₃x₁+g₂x₂+g₁x₃+g₀x₄+g⁻¹x₅+g⁻²x₆

=g₁(x₃+0)+g₂(x₄+x₂)+g₃(x₅+x₁)+g₄(x₆+x₀)

c₃=g₄x₂+g₃x₃+g₂x₄+g₁x₅+g₀x₆+g⁻¹x₇+g⁻²x₈

=g₁(x₅+0)+g₂(x₆+x₄)+g₃(x₇+x₃)+g₄(x₈+x₂)

c₅=g₄x₄+g₃x₅+g₂x₆+g₁x₇+g₀x₈+g⁻¹x₉+g⁻²x₁₀

=g₁(x₇+0)+g₂(x₈+x₆)+g₃(x₉+x₅)+g₄(x₁₀+x₄)

The first clock cycle producing a valid HFS output is at i=3. At i=3, cell D₁ 122 receives as its q_(i) the input value x₂ (delayed at i=2 or delay element 110), D₂ 124 receives x₁ and D₃ 126 receives x₀. D₄ 128 always receives a q_(i) of 0. The propagated inputs p_(i) at i=3 are all 0. Therefore, according to the basic formula M_(i)=(p_(i)+q_(i))*g (from FIG. 2), the intermediate outputs at i=3 are: M=x₂g₄, M₂=x₁g₃ and M₃=x₀g₂. The intermediate output M₄ is zero because both q₁ and p_(i) inputs are 0 for cell C₄ 128. Adder 140 adds the intermediate outputs M₁, M₂, M₃ and M₄ to obtain a c₀=x₀g₂+x₁g₃+x₂g₄, which matches the first term for the simplified HFS output. At i=4, as mentioned when discussing the LFS output, the HFS output is ignored, not observed and instead, at i=5, the next HFS output c₁ is observed.

Table 1 below summarizes the intermediate outputs L and M, and final outputs c_(i−4) and a_(i−3) at each clock cycle for the forward DWT in the first eight clock cycles (i=0 to 7) and matches the above equations for the simplified outputs.

In Table 1 below, the bracketed form {rst} represents r*(s+t).

TABLE 1 i (L₀,M₀) (L₁,M₁) (L₂,M₂) (L₃,M₃) (L₄,M₄) a_(i−4) 150 c_(i−1) 160 0 (h₄x₀,0) (0,0) (0,0) (0,0) (0,0) not valid not valid 1 (h₄x₁,0) (h₃x₀,g₄x₀) (0,0) (0,0) (0,0) not valid not valid 2 (h₄x₂,0) (h₃x₁,g₄x₁) (h₂x₀,g₃x₀) (0,0) (0,0) not valid not valid 3 (h₄x₃,0) (h₃x₂,g₄x₂) (h₂x₁,g₃x₁) (h₁x₀,g₂x₀) (0,0) not valid c₀ 4 (h₄x₄,0) (h₃x₃,g₄x₃) (h₂x₂,g₃x₂) (h₁x₁,g₂x₁) (h₀x₁,g₁x₀) a₀ not valid 5 (h₄x₅,0) (h₃x₄,g₄x₄) (h₂x₃,g₃x₃) {h₁x₂x₀,g₂x₂x₀} (h₀x₁,g₁x₁) not observed c₁ 6 (h₄x₆,0) (h₃x₅,g₄x₅) {h₂x₄x₀,g₃x₄x₀} {h₁x₃x₁,g₂x₃x₁} (h₀x₂,g₁x₂) a₁ not observed 7 (h₄x₇,0) {h₃x₆x₀,g₄x₆x₀} {h₂x₅x₁,g₃x₅x₁} {h₁x₄x₂,g₂x₄x₂} (h₀x₃,g₁x₃) not observed c₂

FIG. 3 shows a systolic architecture for computing an inverse Discrete Wavelet Transform.

The reconstruction of the sequence x_(i) is represented by the expression x_(i)=Σ_(n)[{overscore (h)}_(2n−i)a_(n)+{overscore (g)}_(2n−i)c_(n)]=Σ_(n){overscore (h)}_(2n−i)a_(n)+Σ_(n){overscore (g)}_(2n−i)c_(n), where a_(n) are the LFS outputs of the forward DWT and c_(n) the HFS outputs. The inverse DWT has inverse high pass filter coefficients {overscore (g)} and inverse low pass filter coefficients {overscore (h)}.

We can split the x_(i) reconstruction into a sum of two summations:

x_(i) ⁽¹⁾=Σ_(n){overscore (h)}_(2n−i)a_(n),

x_(i) ⁽²⁾=Σ_(n){overscore (g)}_(2n−i)c_(n).

The even terms of x_(i) ⁽¹⁾ and x_(i) ⁽²⁾, i.e. x_(2j) ⁽¹⁾ and x_(2j) ⁽²⁾ for j=0, 1, . . . , n/2−1 using these filter coefficients are expanded as: $\begin{matrix} {{x_{0}^{(1)} = {{{\overset{\_}{h}}_{0}a_{0}} + {{\overset{\_}{h}}_{2}a_{1}}}},} & {{x_{0}^{(2)} = {{{\overset{\_}{g}}_{0}c_{0}} + {{\overset{\_}{g}}_{2}c_{1}} + {{\overset{\_}{g}}_{4}c_{2}}}},} \\ {{x_{2}^{(1)} = {{{\overset{\_}{h}}_{- 2}a_{0}} + {{\overset{\_}{h}}_{0}a_{1}} + {{\overset{\_}{h}}_{2}a_{2}}}},} & {{x_{2}^{(2)} = {{{\overset{\_}{g}}_{- 2}c_{0}} + {{\overset{\_}{g}}_{0}c_{1}} + {{\overset{\_}{g}}_{2}c_{2}} + {{\overset{\_}{g}}_{4}c_{3}}}},} \\ {{x_{4}^{(1)} = {{{\overset{\_}{h}}_{- 2}a_{1}} + {{\overset{\_}{h}}_{0}a_{2}} + {{\overset{\_}{h}}_{2}a_{3}}}},} & {{x_{4}^{(2)} = {{{\overset{\_}{g}}_{- 2}c_{1}} + {{\overset{\_}{g}}_{0}c_{2}} + {{\overset{\_}{g}}_{2}c_{3}} + {{\overset{\_}{g}}_{4}c_{4}}}},} \\ {\quad \vdots} & {\quad \vdots} \\ {{x_{n - 6}^{(1)} = {{{\overset{\_}{h}}_{- 2}a_{{n/2} - 4}} + {{\overset{\_}{h}}_{0}a_{{n/2} - 3}} + {{\overset{\_}{h}}_{2}a_{{n/2} - 2}}}},} & {{x_{n - 6}^{(2)} = {{{\overset{\_}{g}}_{- 2}c_{{n/2} - 4}} + {{\overset{\_}{g}}_{0}c_{{n/2} - 3}} + {{\overset{\_}{g}}_{2}c_{{n/2} - 2}} + {{\overset{\_}{g}}_{4}c_{{n/2} - 1}}}},} \\ {{x_{n - 4}^{(1)} = {{{\overset{\_}{h}}_{- 2}a_{{n/2} - 3}} + {{\overset{\_}{h}}_{0}a_{{n/2} - 2}} + {{\overset{\_}{h}}_{2}a_{{n/2} - 1}}}},} & {{x_{n - 4}^{(2)} = {{{\overset{\_}{g}}_{- 2}c_{{n/2} - 3}} + {{\overset{\_}{g}}_{0}c_{{n/2} - 2}} + {{\overset{\_}{g}}_{2}c_{{n/2} - 1}}}},} \\ {{x_{n - 2}^{(1)} = {{{\overset{\_}{h}}_{- 2}a_{{n/2} - 2}} + {{\overset{\_}{h}}_{0}a_{{n/2} - 1}}}},} & {x_{n - 2}^{(2)} = {{{\overset{\_}{g}}_{- 2}c_{{n/2} - 2}} + {{\overset{\_}{g}}_{0}{c_{{n/2} - 1}.}}}} \end{matrix}$

The inverse filter coefficients like their forward counterparts have certain symmetric properties allowing some associative grouping. One property of the inverse high-pass coefficients is {overscore (g)}_(n)=(−1)^(n)h_(1−n). Since h_(n)=h_(−n), as discussed for FIG. 1, the inverse high-pass coefficients also have a property such that {overscore (g)}_(n)=(−1)^(n)h_(n−1). Thus, for n=0, {overscore (g)}₀=h⁻¹. For n=2, since {overscore (g)}₂=h₁ and h⁻¹={overscore (g)}₀, {overscore (g)}₂={overscore (g)}₀. Likewise, for n=4, {overscore (g)}₄=h₃={overscore (g)}⁻². From the discussion of FIG. 1, the inverse low-pass coefficients have the property {overscore (h)}_(n)={overscore (h)}_(−n), such that {overscore (h)}₂={overscore (h)}⁻². Thus, the even-numbered outputs x_(2j) require only four coefficients, {overscore (h)}₀, {overscore (h)}₂, {overscore (g)}₂ and {overscore (g)}₄ in order to be computed. Similarly, for odd-numbered outputs x_(2j−1), it can be shown by the same filter properties discussed above that only five coefficients, {overscore (h)}₃, {overscore (h)}₁, {overscore (g)}₅, {overscore (g)}₃ and {overscore (g)}₁ are required.

The equations above show the complexity of the inverse DWT computation. The architecture for computing the inverse DWT consists of two input sequences a_(i) and c_(i), which represent the high-frequency sub-band and the low-frequency sub-band, respectively. Comparing FIG. 2 with FIG. 3, the DWT architecture is necessarily asymmetric since the forward architecture receives one input and produces two output sequences, whereas the inverse architecture receives two inputs and produces one output. This architecture is further complicated by the fact that the odd-numbered outputs, i.e., x₁, x₃, x₅ . . . , require five processing cells, one for each coefficient, whereas the even-numbered outputs, i.e., x₀, x₂, x₄ . . . , require only four processing cells. Moreover, the data flow for odd and even terms are not symmetric. The odd-numbered outputs are generated only odd clock cycles while even-numbered outputs are generated only on even clock cycles.

Thus, the inverse DWT architecture must be composed of two distinct blocks—an even output generating block 300 and an odd output generating block 350. Even output generating block 300 is further composed of two subcircuits—an even high frequency sub-band subcircuit (HFS) 310 and an even low frequency sub-band subcircuit (LFS) 320. Even HFS subcircuit 310 consists of two processing cells 315 and 317 each of which are composed of a multiplier and an adder. The processing cells 315, 317, 325 and 327 operate similar to the basic processing cell 200 shown in FIG. 2 except that each needs only one coefficient and consequently computes one intermediate rather than two. For instance, processing cell 315 outputs a term such that a_(i) is first added to the propagated input from processing cell 317, with that sum multiplied by {overscore (h)}₂. Likewise for low frequency sub-band circuit 320, processing cell 325 outputs a term to adder/controller 330 which is the product of {overscore (g)}₄ and the sum of the input c_(i) and the propagated input from processing cell 327. Processing cell 317 receives as one input 0 and as the other input a_(i−1) since delay element 312 holds the value given it on the previous clock, transmitting it on the next clock cycle.

Even output generating block operates as follows. At i=0, a₀ is propagated to delay 312, and c₀ to delay 322. Though a₀ and c₀ are also input to cells 315 and 325, respectively, adder/controller 330 waits until the third clock cycle to output x₀ and have non-zero propagated inputs. At i=0, cells 317 and 327 have outputs of 0, since initial values released by delays 312, 324 and 322 are set at zero. At i=1, delay 312 releases a₀ to the p_(i) input of cell 317 and a₁ is held at delay 312 and input to cell 315. As a result, cell 315 generates the term {overscore (h)}₂a₁ and cell 317 generates {overscore (h)}₀a₀. These outputs are sent to adder/controller 330 but are held (latched) until the next clock i=2. At i=1, though cells 325 and 327 generate the terms c₁{overscore (g)}₄ and c₀{overscore (g)}₂, respectively, these terms are ignored (cleared) by adder/controller 330 since according to the reconstruction formula, the first output x₀ requires a c₂ term.

At i=2, the third clock cycle, delay 324 releases c₀ to the p_(i) (propagated) input of cell 327 and delay 322 releases c₁ to the q_(i) input of cell 327 (for a description of q_(i) and p_(i), see FIG. 2 and associated text). Thus, cell 327 generates the term (c₁+c₀){overscore (g)}₂. Cell 325 generates c₂{overscore (g)}₄. As described earlier, the outputs of cells 315 and 317 from the previous clock were held at adder/controller 330 and are now summed, at i=2 with the terms generated by cells 325 and 327. Again, at i−2, even though cells 315 and 317 generate terms (a₀+a₂){overscore (h)}₂ and a₁{overscore (h)}₀, respectively, these terms are held one clock cycle. Instead, the i=2 outputs of cells 325 and 327 which are c₂{overscore (g)}₄ and (c₀+c₁)*{overscore (g)}₂, respectively, are summed with the i=1 outputs of cells 315 and 317 which are {overscore (h)}₀a₀ and {overscore (h)}₂a₁. Hence, adder/controller 330 generates the first output x₀={overscore (h)}₀a₀+{overscore (h)}₂a₁+c₀{overscore (g)}₂+c₁{overscore (g)}₂c₂{overscore (g)}4.

Thus, for each clock cycle i, after i=2 (the third clock cycle), adder/controller 330 receives current outputs of subcircuit 320 and adds them to the previous clock's outputs from subcircuit 310. Additionally, adder/controller 330 receives the current output of subcircuit 310, holding them until the next clock cycle.

FIG. 3 also shows an odd output generating block 350 which requires five processing cells—365, 367, 375, 377 and 379. The processing cells 365, 367, 375, 377 and 379 operate similarly to the processing cell 200 shown in FIG. 2. The delay elements 362, 364, 372 and 374 hold their inputs for one clock cycle and release them on the next clock cycle. Each cell has an adder and multiplier and receives a propagated input from the cell to which it is connected.

Odd output generating block 350 operates as follows. At i=0, a₀ is propagated to cell 365 and is held on clock cycle at delay 362, while cell 375 receives c₀. At i−1, delay 362 releases a₀ to cell 367, while delay 372 release c₀ to cell 377. Also, at i=1 a₁ and c₁ are input to cells 365 and 375, respectively. At i=2, cell 365 receives a₂, cell 367 receives a₁ as its q_(i) and receives a₀ as its p_(i) input. Thus, cell 365 generates a term a₂{overscore (h)}₃ and cell 367 generates (a₁+a₀){overscore (h)}₁. These outputs are sent to adder/controller 380 but are held for one clock cycle before being summed with the outputs of cells 375, 377 and 379. At i=2, the outputs of cells 375, 377 and 379 are ignored by adder/controller 380.

At i=3, c₃ is input to cell 375, cell 377 receives c₂ from the delay 372, cell 379 receives as propagated input c_(i), and cell 377 receives as its propagated input, c₀. Thus, cell 375 generates the term c₃{overscore (g)}₅, cell 377 generates the term (c₀+c₂)*{overscore (g)}₃, and cell 379 generates c₁{overscore (g)}₁. These outputs are received by adder/controller 380 which adds the i=3 outputs of cells 375, 377 and 379 with the latched, i=2 outputs of cells 367 and 367 from the previous clock cycle. Hence, adder/controller 380 generates the second output (the first odd output) x₁={overscore (h)}₁a₀+{overscore (h)}₁a₁+{overscore (h)}₃a₂+{overscore (g)}₃c₀+{overscore (g)}₃c₂+{overscore (g)}₅c₃+{overscore (g)}₁c₁.

Thus, for each clock cycle i, after i=3, (the fourth clock cycle), adder/controller 380 receives the current outputs of cells 375, 377 and 379 and adds them to the previous clock cycle's outputs of cells 365 and 367. Additionally, adder/controller 380 receives the current clock's outputs of cells 365 and 367 holding them until the next clock cycle.

FIGS. 1 and 3 show the complexity necessary to compute the DWT and inverse DWT. In an image processing chip, for instance, the circuitry should be capable of both the forward and inverse DWT. In addition to implementing biorthogonal spline filters for reducing and simplifying the forward and inverse DWT as shown in FIGS. 1 and 3, the invention also provides for an integrated architecture performing both.

FIG. 4 shows a single integrated systolic architecture than can be used for both the forward Discrete Wavelet Transform and the inverse Discrete Wavelet Transform. The expressions described for the inverse DWT and forward DWT above are implemented in one integrated architecture. Thus, the description of FIG. 4 will concentrate on the architecture rather than mathematical properties which make an integrated architecture possible, since these properties have already been described.

FIG. 4 shows four control signals, a clocking signal 401, a selector signal I₁, selector signal I₂ and signal I₃. O₁ and O₂ are generated by an adder module and control circuit 480. Five processing cells—410, 420, 430, 440 and 450—each have an adder and multiplier (and registers storing the two coefficients). Each cell has the coefficients shown stored in registers or other such devices (e.g., {overscore (h)}₃ and {overscore (h)}₂ for cell 410). Input line L is coupled via multiplexers and delays to each of the processing cells. The integrated architecture has a delay element 402, multiplexer (MUX) 472, delay element 404, MUX 476, MUX 470, delay element 406, MUX 471 and delay element 408 coupled to line 400. Also shown are a MUX 478, MUX 479, MUX 474, an input line 400, and two output lines O₁ and O₂.

The control line I₁ and I₂ are both at a low logic level when the architecture is to function as a forward DWT circuit. During the forward DWT, the input line 400 is sending values corresponding to input samples prior to decomposition. Delay elements 402, 404, 406 and 480 hold samples from the input line 400 for one clock and then release them on the next clock. For MUX 478 and 470, the select line/control signal is I₁. When I₁₌0, MUX 470 selects line 400 rather than the input c_(i) and MUX 478 selects the propagated input from cell 430. For MUX 472, 474, MUX 476, MUX 479 and MUX 471, I₃ is the select line or control signal.

When I₃ is low (0), MUX 472 selects input line 400, MUX 474 selects the propagated input from cell 420, MUX 476 selects the input from the output of MUX 478, MUX 479 selects the propagated input output by cell 440 and MUX 471 the propagated input output by cell 450. In the forward DWT mode, therefore, the circuit functions similar to the array shown in FIG. 1. Even though there are nine (both high-pass and low-pass), forward DWT filter coefficients and nine inverse DWT filter coefficients, due to the symmetry properties discussed above, the architecture can be simplified to a total of nine coefficients (both low and high pass). With only nine coefficients, only five basic processing cells such as that shown in FIG. 2, are needed to compute the forward and inverse DWT on the integrated architecture.

In the inverse DWT computation, referring to FIG. 3, it has been shown that two input sequences a_(i) and c_(i) generate one output sequence x_(i) which is the reconstructed original sample. However, FIG. 3 also shows that odd and even numbered outputs are computed separately, and observed on alternating clock cycles. Thus, in FIG. 4, the output x_(2j+1), representing the odd-numbered outputs is observed on the O₁ terminal, and the even-numbered outputs are observed on the O₂ terminal. For the inverse DWT, I₁ and I₂ are both set to one. When the clock cycle is low, I₃, after a certain delay, is also low (since I₂ is high, the output of AND gate 490 (I₃) is also high, subject to the propagation delay through gate 490).

When I₃ is high, MUX 471 selects input line 400, MUX 479 selects the propagated input output by cell 450, MUX 476 selects the input line 400 as does MUX 474, and MUX 472 selects 0. In the inverse DWT mode, line 400 now propagates a_(i−1) rather than x_(i). In inverse DWT mode, I₁=1 (is always high), and as a result, MUX 470 selects the input c_(i) and MUX 478 selects the input line 400 (after delay element 404). Utilizing these control signals and multiplexers, the architecture of FIG. 4 is capable of functioning as an inverse DWT (shown in FIG. 3) or a forward DWT (shown in FIG. 1). No complex “scheduling” of input and intermediate outputs is required as in traditional architectures and for every clock, an output is produced at terminals O₁ and O₂.

FIG. 5 shows a timing diagram of control signals, clocking signals and output terminals for the integrated architecture of FIG. 4 when operating in the forward DWT mode.

Referring to FIG. 5, the I₁ control signal is set to 0 for all clock cycles during the forward DWT mode. Also, the I₂ control signal is set to 0 for all clock cycles in the forward DWT mode. FIG. 5 also shows a clock signal generated by a clocking mechanism wherein the first half of the first clock cycle is represented by an i value of 0 (low state) and the second half of the first clock cycle by an i value of 1 (high state) and the first half of the second clock cycle by an i value of 2 transitions again to a low state. The clock signal is input to an AND gate along with the I₂ signal which generates an output signal I₃. Since I₂ is always 0 for all clock cycles, I₃ is also always 0 during the forward DWT mode. FIG. 5 also shows the two output terminals O₁ and O₂ of FIG. 4. Output terminal O₁ does not show a valid output until the first half of the third clock cycle, when i=4, whereupon O₁ returns a value a₀. On the second half of the third clock cycle, at i=5, the output terminal O₁ does not return a valid value for the output sequence a_(n). Rather, on this half of the clock cycle, the output terminal O₂ returns a valid value for c₁. As can be seen from FIG. 5, neither of the output terminals O₁ or O₂ return a valid value until i=3, whereupon output terminal O₂ returns c₀. Starting with the second half of the second clock cycle (i=3), the output terminals O₁ and O₂ alternatingly produce valid values with O₁ producing the sequence an and O₂ producing the sequence c_(n).

FIG. 6 shows a timing diagram of control signals, clocking signals and output terminals for the integrated architecture of FIG. 4 when operating in the inverse DWT mode.

In the inverse DWT mode, the control signal I₁ is always set to 1 as is the control signal I₂. I₂ and the clocking signal are both input to an AND gate to generate the control signal I₃. Due to the delay of propagating through the AND gate, the signal I₃ is not coincident with the clocking signal, but is slightly delayed on its trailing edge. Since the even and odd reconstructed output sequences computed from the inverse DWT are very different in characteristic (see FIG. 3 and associated description) the odd numbered outputs x₁, x₃, x₅, etc. are observed on output terminal O₁, whereas the even numbered output sequences x₀, x₂, x₄, etc. are observed on output terminal O₂. When I₃ is high, the output terminal O₂ generates the even numbered output terms for the sequence for the reconstructed input sequence and, when I₃ is low, the output terminal O₁ generates the odd numbered outputs of the reconstructed input sequence. As described earlier, the first valid output x₀ is observed on terminal O₂ only starting with the second half of the second clock cycle, where i=3. On the next half clock cycle at i=4, output terminal O₁ generates a valid term x₁, while the output terminal O₂ produces an invalid value. Thus, on alternating half clock cycles starting with i=3, the output terminals O₁ and O₂ combined generate the entire reconstructed input sequence x_(n).

FIG. 7 shows the construction of a two-dimensional integrated Discrete Wavelet Transform and inverse Discrete Wavelet Transform module.

The two-dimensional integrated module 700 shown in FIG. 7 is the extension of the one-dimensional integrated architecture of FIG. 4 for a two-dimensional case such as an image compression. FIG. 7 shows within the integrated module 700 a row-wise one-dimensional integrated module 710 and a column-wise one-dimensional integrated module 730. Each of these integrated modules operate similar to the integrated architecture shown in FIG. 4, in that they are both capable of constructing a forward Wavelet Transform for a single input sequence x and the inverse Discrete Wavelet Transform for reconstructing the input sequence x based upon high-frequency sub-band inputs and low frequency sub-band inputs. A transpose circuit 720 is coupled between the integrated module 710 and the integrated module 730 to rearrange the data by transposing the matrix.

In the forward Discrete Wavelet Transform case, the input 750 is a single input sequence which is indexed by both x and y coordinates. In the forward case, this input 750 is transformed by the two-dimensional integrated module 700 into an output 755 which consists of a low frequency sub-band output sequence A which is indexed by its x and y coordinates (shown as A_(x) and A_(y) in FIG. 7) and a high frequency sub-band output sequence C also indexed by its x and y coordinates (shown as C_(x) and C_(y) in FIG. 7). In the inverse DWT case, the integrated module 700 receives via input 750 a low frequency sub-band input sequence A indexed by its x and y coordinates and a high frequency sub-band input sequence C also indexed by its x and y coordinates. This input 750 in the inverse DWT case generates an output 755 which is a single output sequence which consists of the reconstructed input sequence indexed by both its x and y coordinates. For image compression, the forward DWT case corresponds to the compression of the image while the inverse DWT case corresponds to the decompression of the image.

FIG. 8 is a flowchart of the basic method of integrating forward and inverse DWT in a single architecture.

At step 800, mode selection for the architecture determines whether a first mode, the forward DWT, is required or the second mode, the inverse DWT , is required. In an image processing application, some switch/toggle may perform this selection based on whether compression or decompression is to be performed.

If the first mode is selected, the architecture will begin to perform the forward DWT (step 810). For the forward DWT mode as shown in FIG. 5, a first control signal I₁ is set low or a value of 0 (step 811). A second control signal I₂ is also set low or a value of 0 (step 812). Next, the second control signal is propagated as one input of a two input AND gate, while the clocking signal itself is the other input. This generates a third control signal I₃ (step 814). The first and third control signals, I₁ and I₃ are provided to multiplexers to select the appropriate inputs of those multiplexers when computing the forward DWT (step 816). Finally, according to step 818, the forward DWT is computed to completion.

If the second mode is selected, the architecture will begin to perform the inverse DWT (step 820). For the inverse DWT mode as shown in FIG. 6, a first control signal I₁ is set high or a value of 1 (step 821). A second control signal I₂ is also set high or a value of 1 (step 822). Next, the second control signal is propagated as one input of a two input AND gate, while the clocking signal itself is the other input. This generates a third control signal I₃ (step 824). The first and third control signals, I₁ and I₃ are provided to multiplexers to select the appropriate inputs of those multiplexers when computing the inverse DWT (step 826). Finally, according to step 828, the inverse DWT is computed to completion.

The above flowchart shows that by multiplexing inputs and controlling the selection of the multiplexed inputs depending on the mode selected, a single architecture can be used to compute both the forward and inverse DWT. Not shown in the flowchart of FIG. 8, is that the computing steps 818 and 828 utilizes biorthogonal spline filter coefficients as a basis for computing the forward and inverse DWT, respectively. Also, symmetry properties of these filter coefficients are used to reduce the output equations for compute both inverse and forward DWT, with these coefficients being supplied to processing cells of the architecture. The multiplexers allow selective coupling of the processing cells in order to compute the forward and inverse DWT.

In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will however be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are accordingly to be regarded as illustrative rather than restrictive. 

What is claimed is:
 1. An integrated system for computing a two-dimensional Discrete Wavelet Transform, said system comprising: a first integrated forward and inverse Discrete Wavelet Transform module, said first module computing row-wise elements of said two-dimensional transform; a transpose circuit coupled to said first module, said circuit receiving said row-wise elements; a second integrated forward and inverse Discrete Wavelet Transform Module coupled to said transpose circuit, said second module receiving transposed row-wise elements and computing therefrom column-wise elements of said two-dimensional transform.
 2. The system of claim 1, wherein the first and second integrated forward and inverse Discrete Wavelet Transform modules each comprise a plurality of processing cells to compute the Discrete Wave Transform.
 3. The system of claim 2, wherein a plurality of the processing cells comprise an adder to add input data which is the subject of the Discrete Wave Transform to a propagated input received by the processing cell from another processing cell, and a multiplier to multiply the sum of said addition by a coefficient to compute the Discrete Wave Transform.
 4. The system of claim 2, wherein each of the processing cells is coupled to an adder and control circuit which multiplies and adds outputs from the processing cells.
 5. The system of claim 1, wherein the Discrete Wavelet Transform modules generate a low frequency sub-band output and a high frequency sub-band output when computing a forward Discrete Wavelet Transform.
 6. The system of claim 1, wherein the Discrete Wavelet Transform modules use biorthogonal spline filter coefficients as a basis to compute the Discrete Wave Transform.
 7. The system of claim 2, wherein at least one of the processing cells contains a latch register to store a propagated input before passing the propagated input to another processing cell.
 8. The system of claim 1, wherein a low frequency sub-band input and a high frequency sub-band input are received by the Discrete Wavelet Transform modules when computing an inverse Discrete Wavelet Transform.
 9. The system of claim 1, wherein a switch is coupled to at least one of the Discrete Wavelet Transform modules to select forward or inverse Discrete Wavelet Transform.
 10. The system of claim 1, wherein each Discrete Wavelet Transform module further comprises an even output generating block to generate outputs on even clock cycles, and an odd output generating block to generate outputs on odd clock cycles, in order to compute an inverse Discrete Wavelet Transform.
 11. The system of claim 10, wherein the even output generating block comprises an even high frequency sub-band subcircuit containing at least on processing cell to add a first data input which is a subject of the inverse Discrete Wavelet Transform to a first propagated input and then multiplying the sum by a high-pass frequency coefficient, and an even low frequency sub-band subcircuit containing at least one processing cell to add a second data input which is a subject of the inverse Discrete Wavelet Transform to a second propagated input, and then multiplying the sum by a low-pass frequency coefficient.
 12. The system of claim 11, wherein the odd output generating block comprises an odd high frequency sub-band subcircuit containing at least one processing cell to add a first data input which is a subject of the inverse Discrete Wavelet Transform to a first propagated input and then multiplying the sum by a high-pass frequency coefficient, and an odd low frequency sub-band subcircuit containing at least one processing cell to add a second data input which is a subject of the inverse Discrete Wavelet Transform to a second propagated input, and then multiplying the sum by a low-pass frequency coefficient.
 13. A method comprising: generating even outputs of an inverse Discrete Wavelet Transform by delivering, on a first clock cycle, a first element of a first input data sequence and a first element of a second input data sequence to first and second processing cells, respectively, delivering, on a second clock cycle, the first and a second element of the first input data sequence to a third processing cell and the first processing cell, respectively, multiplying the elements by coefficients, and sending the results to an adder/controller, delivering, on a third clock cycle, a third element of the second input data sequence to the second processing cell and the first and a second element of the second input data sequence to a fourth processing cell, multiplying the third element and the sum of the first and second elements by coefficients, and sending the results to the adder/controller, and adding the results in the adder/controller.
 14. The method of claim 13, wherein delivering on the second clock cycle includes latching, through the next clock cycle, the results sent to the adder/controller.
 15. The method of claim 13, wherein delivering includes delaying delivery by using delay elements to coordinate propagation between the processing cells.
 16. A method comprising: generating odd outputs of an Discrete Wavelet Transform by delivering, on a first clock cycle, a first element of a first input data sequence and a first element of a second input data sequence to a first and a second processing cell, respectively, delivering, on a second clock cycle, the first and a second element of the first input data sequence to a third and the first processing cell, receptively, and the first and a second element of the second input data sequence to a fourth and the second processing cell, respectively, delivering, on a third clock cycle, a third element of the first input data sequence to the first processing cell and the first and second elements of the first input data sequence to the third processing cell, multiplying the third element and the sum of the first and second elements by a coefficient and sending the results an adder/controller, delivering, on a fourth clock cycle, the first and a third element of the second data input sequence to the fourth processing cell and delivering the second and a fourth element of the second input data sequence to a fifth and the second processing cell, respectively, multiplying the second element, the fourth element, and a sum of the first and third elements by a coefficient and sending the result to the adder/controller, and adding the results in the adder/controller.
 17. The method of claim 16, wherein delivering on the third clock cycle includes latching, through the next clock cycle, the results sent to the adder/controller.
 18. The method of claim 16, wherein delivering includes delaying delivery by using delay elements to coordinate propagation between the processing cells. 